
/* Generated by Interface Builder */

#import "IUifNode.h"
#import <stdio.h>
#import <objc/hashtable.h>
#import <libc.h>

@implementation IUifNode

- init
{
    [super init];
    iActiveFlag = YES;
    iLeafFlag = NO;
    iLinkedData = nil;
    iType = UnDefined;
    iImageTitle = nil;
    return self;
}

- (char *)titleForCell
{
    return iStringTitle;
}

- setTitleForCell:(const char *)title
{
    sprintf(iStringTitle, "%.255s", title);
    return self;
}

- imageForCell
{
    return iImageTitle;
}

- setImageForCell:image
{
    iImageTitle = image;
    return self;
}

- (BOOL)active
{
    return iActiveFlag;
}

- setActive:(BOOL)flag
{
    iActiveFlag = flag;
    return self;
}

- (BOOL)isLeaf;
{
    return iLeafFlag;
}

- setLeaf:(BOOL)flag
{
    iLeafFlag = flag;
    return self;
}

- setLinkedData:data nodeType:(NodeType)type
{
    [self setLinkedData:data];
    [self setNodeType:type];
    return self;
}

- linkedData
{
    return iLinkedData;
}

- setLinkedData:data
{
    iLinkedData = data;
    return self;
}

- setNodeType:(NodeType)type
{
    iType = type;
    return self;
}

- (NodeType)nodeType
{
    return iType;
}

- setDataGroupName:(const char *)groupname
{
//    strncpy (iDataGroupName, groupname, (sizeof(iDataGroupName)-1));
    if (groupname == NULL) {
	fprintf(stderr,"IUifNode:error:pointer of \"groupname\" is NULL\n");
	return 0;
    }
    iDataGroupName = NXCopyStringBufferFromZone(groupname, [self zone]);
    return self;
}

- (const char *)dataGroupName
{
    return iDataGroupName;
}

- free
{
    free(iDataGroupName);
    [super free];
    return nil;
}

@end
